package com.heima.controller;

import com.heima.model.article.dtos.CollectionBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.UserRelationDto;
import com.heima.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenshan
 */
@RestController
@RequestMapping("api/v1")
public class CollectionBehaviorController {
    @Autowired
    private ArticleService articleService;

    /**
     * 用户行为 - 文章收藏
     * @param behaviorDto 收藏信息
     * @return ResponseResult
     */
    @PostMapping("collection_behavior")
    public ResponseResult collectionBehavior(@RequestBody CollectionBehaviorDto behaviorDto) {
        return articleService.collectionBehavior(behaviorDto);
    }
}
